<div class="container" style="margin-top: 60px;">
    <div class="row" style="margin-top: 10px;">
        <div class="col-lg-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    教师风采
                </div>
                <!-- /.panel-heading -->
                <div class="panel-body">

                    <form id="frmNews" role="form" action="/admin/teacher/<?php echo isset($item) ? "edit/{$item->id}" : "create"; ?>" method="post" data-parsley-validate>
                        <div class="form-group">
                            <label for="teacher_id">教师</label>
                            <input type="text" class="form-control" value="<?php echo $item->people->first_name . $item->people->last_name; ?>" readonly >
                        </div>
                        <div class="form-group">
                            <label for="summary">内容</label>
                            <textarea id="summary" name="summary" style="width: 100%; height: 300px;"><?php echo isset($item) ? $item->summary : ''; ?></textarea>
                        </div>
                        <div class="form-group" style="text-align: center;">
                            <a href="/admin/teacher" class="btn btn-default"> 返回列表页 </a> <button type="submit" class="btn btn-success"> 发布风采 </button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<?php echo render('edu/public/upload'); ?>

<script type="text/javascript" src="/assets/third-party/editor/kindeditor-min.js"></script>
<script type="text/javascript" src="/assets/third-party/editor//lang/zh_CN.js"></script>
<script type="text/javascript">
    var editor;
    KindEditor.ready(function(K) {
        editor = K.create('textarea[name="summary"]', {
            allowFileManager : false
        });
    });
</script>

<script type="text/javascript">
    var path = 'images';
    var imgpanel = '';


    function callback(file, data){
        var json = eval('(' + data + ')');
        if(json.status == 'succ'){
            $("#thumbnail").val(json.data);
        }else{
            alert(json.msg);
        }
    }
</script>